<% @page_title = "View reader infomation" %>
<%= stylesheet_link_tag "admin/view-item", :media => "all" %>
<div class="view-user-info">
	<h1>View reader information</h1>
	<div class='content'>
		<p>
			<label><strong>ID:</strong></label>&nbsp;
			<%= @user.id %>
		</p>
		<p>
			<label><strong>Full Name:</strong></label>&nbsp;
			<%= @user.fullname %>
		</p>
		<p>
			<label><strong>Card ID:</strong></label>&nbsp;
			<%= @user.card_id %>
		</p>
		<p>
			<label><strong>Username:</strong></label>&nbsp;
			<%= @user.username %>
		</p>
		<p>
			<label><strong>Student/Staff ID:</strong></label>&nbsp;
			<%= @user.reader_id %>
		</p>
		<p>
			<label><strong>Email:</strong></label>&nbsp;
			<%= @user.email %>
		</p>
		<p>
			<label><strong>Phone:</strong></label>&nbsp;
			<%= @user.phone %>
		</p>
		<p>
			<label><strong>Reader group:</strong></label>&nbsp;
			<%= Role.getRoleName(@user.role_id) %>
		</p>
		<p>
			<label><strong>Faculty/Department:</strong></label>&nbsp;
			<%= Faculty.getFacultyName(@user.faculty_id) %>
		</p>
	</div><!-- End. content -->
</div>

<div class='actions'>
	<%= link_to "Edit", :controller => "admin/user", :action => "edit", :id => @user.id %>
	<%= link_to "Delete", :controller => "admin/user", :action => "delete", :id => @user.id, :method => "delete", :data => {:confirm => "Are you sure?"} %>
	<%= link_to "Back", :controller => "admin/user", :action => "index" %>
</div>
